\hypertarget{classplugin__base}{
\section{plugin\_\-base Class Reference}
\label{classplugin__base}\index{plugin\_\-base@{plugin\_\-base}}
}
{\tt \#include $<$plugin.hpp$>$}

Inheritance diagram for plugin\_\-base::\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2cm]{classplugin__base}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
\hypertarget{classplugin__base_98a9f4ac48860934a8c1e96218e0cbf8}{
handler\_\-t \textbf{set\_\-defaults} ()}
\label{classplugin__base_98a9f4ac48860934a8c1e96218e0cbf8}

\item 
\hypertarget{classplugin__base_9e7d7fe3bfd0e4fac9d8cc4c88b19d06}{
void $\ast$ \textbf{initialize} (const server \&s)}
\label{classplugin__base_9e7d7fe3bfd0e4fac9d8cc4c88b19d06}

\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
\hypertarget{classplugin__base_1fa7efbeb3925de31e1e59186658c1c0}{
static handler\_\-t \textbf{set\_\-defaults\_\-wrapper} (server $\ast$s, void $\ast$p\_\-d)}
\label{classplugin__base_1fa7efbeb3925de31e1e59186658c1c0}

\item 
\hypertarget{classplugin__base_3f93f1b89e4494a4c389115c8ef005b2}{
static void $\ast$ \textbf{initialize\_\-wrapper} (server $\ast$s, void $\ast$p\_\-d)}
\label{classplugin__base_3f93f1b89e4494a4c389115c8ef005b2}

\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
\hypertarget{classplugin__base_7ce2c669c0efe22575ca69b3becdc237}{
\textbf{plugin\_\-base} (const char $\ast$name, const std::size\_\-t version, \hyperlink{structplugin}{plugin} \&p)}
\label{classplugin__base_7ce2c669c0efe22575ca69b3becdc237}

\end{CompactItemize}
\subsection*{Protected Attributes}
\begin{CompactItemize}
\item 
\hypertarget{classplugin__base_6e26cf6e1b55bc4a0c3d80cc57553e67}{
\hyperlink{structplugin}{plugin} \& \textbf{p}}
\label{classplugin__base_6e26cf6e1b55bc4a0c3d80cc57553e67}

\item 
\hypertarget{classplugin__base_e21602a179186848d2683d5203d811fe}{
const server $\ast$ \textbf{srv}}
\label{classplugin__base_e21602a179186848d2683d5203d811fe}

\end{CompactItemize}


\subsection{Detailed Description}
Base class for deriving C++ plugins from. Possibly useful if you like this sort of thing. Otherwise just make use you extern the appropriate functions (i.e. the \hyperlink{structplugin}{plugin} init function) to have C symbols. Abstract base class for C++ lighty plugins. Not sure if its worth it yet, lets see how useful it is. Really there shouldn't be any significant performance hit with these wrappers, only a small increase in memory usage per \hyperlink{structplugin}{plugin} (irrelivant). Other hit due to function calling convensions for which I do not know the details.

Things that need encapsulating:

\hyperlink{classPlugin}{Plugin} house keeping:\begin{itemize}
\item set which part of the request flow we handle. i.e. \_\-plugin\_\-init\item populate \hyperlink{structplugin}{plugin} config. i.e. set\_\-defaults\item clean up allocated memory we used. i.e. cleanup\end{itemize}


The request flow:\begin{itemize}
\item HTTP request recieved, i.e. protocol, method, uri\_\-raw, headers (see http\_\-req.h)\item \char`\"{}Clean\char`\"{} uri\_\-raw -$>$ uri\_\-clean i.e. mod\_\-rewrite\item Map the clean request to an appropriate docroot.\item Get the physical path to the requested file.\item Do untold horrors to the requested file.\begin{itemize}
\item More things here.\end{itemize}
\item Send a response back maybe.\end{itemize}


Lighty allows plugins to hook in to multiple points of this flow, i.e. one type of \hyperlink{structplugin}{plugin}, but their effects at certain levels may be NULL. Serves as an easy method of sharing data between points of flow. Perhaps theres something in trying to abstract this shared data out, and removing this hardcoded sharing within a \hyperlink{structplugin}{plugin}. Don't know, just a gut feeling. Absolute base for plugins. 

The documentation for this class was generated from the following file:\begin{CompactItemize}
\item 
include/lighttpd-cpp/plugin.hpp\end{CompactItemize}
